package com.quartz.sample.jobs;

import com.quartz.sample.mapper.JobMapper;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.text.SimpleDateFormat;

public class DateTimeJob extends QuartzJobBean {
    @Autowired
    private JobMapper jobMapper;

    private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        jobMapper.testExecute();
    }
}
